<!DOCTYPE html>
<html>
<head>
    <title>Events</title>
    <meta charset="utf-8">
    <link href="../../content/shared/styles/examples-offline.css" rel="stylesheet">
    <link href="../../../styles/kendo.common.min.css" rel="stylesheet">
    <link href="../../../styles/kendo.rtl.min.css" rel="stylesheet">
    <link href="../../../styles/kendo.default.min.css" rel="stylesheet">

    <script src="../../../js/jquery.min.js"></script>
    <script src="../../../js/kendo.web.min.js"></script>
    <script src="../../content/shared/js/console.js"></script>
    <script>
        
    </script>
    
    
</head>
<body>
    
        <a class="offline-button" href="../index.html">Back</a>
    
    
        <div id="example" class="k-content">

            <span id="notification" style="display:none;"></span>
    
            <div class="demo-section">
                <p>
                    <button id="showNotification" class="k-button">Show notification</button>

                    <button id="hideAllNotifications" class="k-button">Hide All Notifications</button>
                </p>
            </div>
            
            <script>
                $(document).ready(function() {

                    function onShow(e) {
                        kendoConsole.log("event :: show (" + $(e.element).find(".timeWrap").text() + ")" );
                    }

                    function onHide(e) {
                        kendoConsole.log("event :: hide (" + $(e.element).find(".timeWrap").text() + ")" );
                    }

                    var notification = $("#notification").kendoNotification({
                        width: "12em",
                        show: onShow,
                        hide: onHide,
                        templates: [{
                            type: "time",
                            template: "<div style='padding: .6em 1em'>Time is: <span class='timeWrap'>#: time #</span></div>"
                        }]
                    }).data("kendoNotification");

                    $("#showNotification").click(function(){
                        var d = new Date();
                        notification.show({ time: kendo.toString(d, 'HH:MM:ss.') + kendo.toString(d.getMilliseconds(), "000") }, "time");
                    });
                    
                    $("#hideAllNotifications").click(function(){
                        notification.hide();
                    });
                });
            </script>

            <div class="demo-section">                
                <h3 class="title">Console log</h3>
                <div class="console"></div>
            </div>

        </div>
	
			
</body>
</html>
